import React from 'react'
import { useSelector,useDispatch } from 'react-redux'
// import { a_increment,a_decrement } from './store'

export default function Count() {
    const count = useSelector(state => state.count)

    const dispatch = useDispatch()

    const handleCountAdd=() => {
        // dispatch(a_increment(1))
    }
    const handleCountAdd2=() => {
        // dispatch(a_decrement(1))
    }
  return (
    <div>
        <h1>{count}</h1>
        <button onClick={handleCountAdd}>+</button>
        <button onClick={handleCountAdd2}>-</button>
    </div>
  )
}
